﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using CMP.ERP.Model;
using CMP.ERP.DAL;

namespace CMP.ERP.BLL
{
    public class MateCompanyBLL
    {
        MateCompanyDAL dal = new MateCompanyDAL();
        /// <summary>
        /// 根据快递公司编码查询匹配地址(省/市)
        /// </summary>
        /// <returns></returns>
        public DataTable ShowExpressMatch(int Express_Company_Id)
        {
            return dal.ShowExpressMatch(Express_Company_Id);
        }
        /// <summary>
        /// 根据快递公司编码查询匹配地址(市/区)
        /// </summary>
        /// <param name="Express_Company_Id"></param>
        /// <returns></returns>
        public DataTable GetExpressMatchShow(int Express_Company_Id)
        {
            return dal.GetExpressMatchShow(Express_Company_Id);
        }
        /// <summary>
        /// 显示地区信息
        /// </summary>
        /// <returns></returns>
        public DataTable ShowProvince()
        {
            return dal.ShowProvince();
        }
        /// <summary>
        /// 判断是否有上级城市
        /// </summary>
        /// <param name="P_City"></param>
        /// <returns></returns>
        public DataTable ShowProvince1(string P_City)
        {
            return dal.ShowProvince1(P_City);
        }
        /// <summary>
        /// 根据快递公司编码查询匹配地址(所有)
        /// </summary>
        /// <param name="Express_Company_Id"></param>
        /// <returns></returns>
        public DataTable GetExpressMatch1(int Express_Company_Id)
        {
            return dal.GetExpressMatch1(Express_Company_Id);
        }
        /// <summary>
        /// 根据快递公司名称查询快递匹配信息
        /// </summary>
        /// <param name="Express_Company_Id">快递公司编码</param>
        /// <returns></returns>
        public DataTable SelExpressMatch(int? Express_Company_Id)
        {
            return dal.SelExpressMatch(Express_Company_Id);
        }
        /// <summary>
        /// 添加匹配信息
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        public int AddExpressMatch(int Express_Company_Id, int P_Id)
        {
            return dal.AddExpressMatch(Express_Company_Id, P_Id);
        }
        /// <summary>
        /// 删除匹配信息
        /// </summary>
        /// <param name="MateCompany_Id"></param>
        /// <returns></returns>
        public int DelExpressMatch(int Express_Company_Id)
        {
            return dal.DelExpressMatch(Express_Company_Id);
        }
    }
}
